{template "header.html"}

<link href="{THEME_PATH}assets/layui/css/layui.css" rel="stylesheet">
<script src="{THEME_PATH}assets/layui/layui.js"></script>
<style>
    .qf_sms-box {
        background-color: #ffffff;
        padding: 15px;
        border-radius: 4px;
    }

    .qf_sms-box .layui-elem-quote {
        font-size: 14px;
        line-height: 24px;
        color: #666666;
        padding: 8px 15px;
        margin-bottom: 15px;
    }

    .qf_sms-box .layui-elem-quote p + p {
        margin-top: 4px;
    }

    .qf_sms-box-item {
        background-color: #f5f6f8;
        padding: 15px;
        margin-bottom: 15px;
    }

    .qf_sms-box-item .layui-elem-quote {
        background-color: #ffffff;
    }

    .qf_sms-box-item .layui-form-item:last-of-type {
        margin-bottom: 0;
    }

    .qf_sms-box-item .layui-form-label {
        width: 200px;
        margin-bottom: 0;
        background-color: #ffffff;
    }

    .qf_sms-box-item .layui-input-inline {
        width: 300px;
    }
</style>

<div class="qf_sms-box">
    <blockquote class="layui-elem-quote">
        <p>配置了腾讯云、阿里云、短信宝三个接口，默认短信排序为阿里云，腾讯云，短信宝。使用哪个平台的短信就填写哪个平台的ID</p>
        <p>原理：阿里云短信发送失败后，自动判断腾讯云短信，再判断短信宝。</p>
    </blockquote>
    <form class="layui-form layui-form-pane" id="myform">
        {$form}
		<div class="qf_sms-box-item">
		    <blockquote class="layui-elem-quote">阿里云接口配置《<a style="color: #f84825;" href="https://www.duixin.cc/pages/shouce/shouce?id=1&ce=13&yijiid=2" target="_blank">如何设置阿里短信?</a>》</blockquote>
		    <div class="layui-form-item">
		        <label class="layui-form-label">ACCESS_KEY_ID</label>
		        <div class="layui-input-inline">
		            <input autocomplete="off" class="layui-input" name="data[aliyun][access_key_id]"
		                   placeholder="请输入阿里云ACCESS_KEY_ID"
		                   type="text" value="{$data['aliyun']['access_key_id']}">
		        </div>
		        <div class="layui-form-mid layui-word-aux">ACCESS_KEY_ID</div>
		    </div>
		    <div class="layui-form-item">
		        <label class="layui-form-label">ACCESS_KEY_SECRET</label>
		        <div class="layui-input-inline">
		            <input autocomplete="off" class="layui-input" name="data[aliyun][access_key_secret]"
		                   placeholder="请输入阿里云ACCESS_KEY_SECRET"
		                   type="text" value="{$data['aliyun']['access_key_secret']}">
		        </div>
		        <div class="layui-form-mid layui-word-aux">ACCESS_KEY_SECRET</div>
		    </div>
		    <div class="layui-form-item">
		        <label class="layui-form-label">阿里云模板ID</label>
		        <div class="layui-input-inline">
		            <input autocomplete="off" class="layui-input" name="data[aliyun][template_id]"
		                   placeholder="请输入阿里云验证码类模板ID"
		                   type="text" value="{$data['aliyun']['template_id']}">
		        </div>
		        <div class="layui-form-mid layui-word-aux">阿里云验证码类模板ID</div>
		    </div>
		</div>
        <div class="qf_sms-box-item">
            <blockquote class="layui-elem-quote">腾讯云接口配置《<a style="color: #f84825;" href="https://www.duixin.cc/pages/shouce/shouce?id=1&ce=12&yijiid=2" target="_blank">如何设置腾讯云短信?</a>》</blockquote>
            <div class="layui-form-item">
                <label class="layui-form-label">SDK APP ID</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="data[qcloud][sdk_app_id]"
                           placeholder="请输入腾讯云SDK APP ID"
                           type="text" value="{$data['qcloud']['sdk_app_id']}">
                </div>
                <div class="layui-form-mid layui-word-aux">短信应用的 SDK APP ID</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">SECRET ID</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="data[qcloud][secret_id]"
                           placeholder="请输入腾讯云SECRET ID"
                           type="text" value="{$data['qcloud']['secret_id']}">
                </div>
                <div class="layui-form-mid layui-word-aux">SECRET ID</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">SECRET KEY</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="data[qcloud][secret_key]"
                           placeholder="请输入腾讯云SECRET KEY"
                           type="text" value="{$data['qcloud']['secret_key']}">
                </div>
                <div class="layui-form-mid layui-word-aux">SECRET KEY</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">腾讯云模板ID</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="data[qcloud][template_id]"
                           placeholder="请输入腾讯云验证码类模板ID"
                           type="text" value="{$data['qcloud']['template_id']}">
                </div>
                <div class="layui-form-mid layui-word-aux">腾讯云验证码类模板ID</div>
            </div>
        </div>
        
        <div class="qf_sms-box-item">
            <blockquote class="layui-elem-quote">短信宝接口配置《<a style="color: #f84825;" href="https://www.duixin.cc/pages/shouce/shouce?id=1&ce=14&yijiid=2" target="_blank">如何设置短信宝短信?</a>》</blockquote>
            <div class="layui-form-item">
                <label class="layui-form-label">账号</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="data[smsbao][user]"
                           placeholder="请输入短信宝账号"
                           type="text" value="{$data['smsbao']['user']}">
                </div>
                <div class="layui-form-mid layui-word-aux">账号</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">API KEY</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="data[smsbao][password]"
                           placeholder="请输入短信宝API KEY"
                           type="text" value="{$data['smsbao']['password']}">
                </div>
                <div class="layui-form-mid layui-word-aux">API KEY</div>
            </div>
        </div>
        <div class="qf_sms-box-item">
            <blockquote class="layui-elem-quote">短信签名配置</blockquote>
            <div class="layui-form-item">
                <label class="layui-form-label">短信签名</label>
                <div class="layui-input-inline">
                    <input autocomplete="off" class="layui-input" name="data[sign_name]"
                           placeholder="请输入短信签名"
                           type="text" value="{$data['sign_name']}">
                </div>
                <div class="layui-form-mid layui-word-aux">短信签名</div>
            </div>
        </div>
        <button class="layui-btn" onclick="dr_ajax_submit('{dr_now_url()}', 'myform', '2000')" type="button">
            {dr_lang('保存')}
        </button>
    </form>
</div>

{template "footer.html"}
